inherited rstMeters: TrstMeters
  Left = 30
  Top = 130
  Width = 1206
  Height = 621
  Caption = #1056#1077#1077#1089#1090#1088' '#1080#1085#1076#1080#1074#1080#1076#1091#1072#1083#1100#1085#1099#1093' '#1087#1088#1080#1073#1086#1088#1086#1074' '#1091#1095#1077#1090#1072
  OnActivate = FormActivate
  PixelsPerInch = 96
  TextHeight = 13
  inherited Splitter1: TSplitter
    Left = 931
    Height = 550
  end
  inherited pStatusBar: TStatusBar
    Top = 575
    Width = 1198
  end
  inherited ToolBar1: TToolBar
    Width = 1198
    inherited ToolButton4: TToolButton
      Visible = False
    end
    inherited ToolButton3: TToolButton
      Hint = ''
      Action = nil
      Caption = ''
    end
    inherited ToolButton6: TToolButton
      Visible = False
    end
    object ToolButton15: TToolButton
      Left = 216
      Top = 0
      Action = aPost
    end
    object ToolButton12: TToolButton
      Left = 240
      Top = 0
      Width = 8
      Caption = 'ToolButton12'
      ImageIndex = 8
      Style = tbsSeparator
    end
    object ToolButton13: TToolButton
      Left = 248
      Top = 0
      Action = aShowMeter
    end
    object ToolButton14: TToolButton
      Left = 272
      Top = 0
      Width = 8
      Caption = 'ToolButton14'
      ImageIndex = 22
      Style = tbsSeparator
    end
    object Panel4: TPanel
      Left = 280
      Top = 0
      Width = 173
      Height = 23
      BevelOuter = bvNone
      TabOrder = 0
      object cbChargeOnCalc: TDBCheckBoxEh
        Left = 4
        Top = 2
        Width = 166
        Height = 17
        AlwaysShowBorder = True
        Caption = #1056#1072#1089#1095#1080#1090#1072#1090#1100' '#1087#1088#1080' '#1089#1086#1093#1088#1072#1085#1077#1085#1080#1080
        Flat = True
        TabOrder = 0
        ValueChecked = '0'
        ValueUnchecked = '1'
      end
    end
  end
  inherited Panel1: TPanel
    Left = 936
    Height = 550
    inherited TfraAddress1: TfraAddress
      Top = 0
      Height = 250
      inherited SearchBox: TGroupBox
        Height = 250
        inherited SubPanel: TPanel
          Height = 233
          inherited Label8: TLabel
            Top = 153
            Caption = #1059#1089#1083#1091#1075#1072
            Visible = True
          end
          inherited Label6: TLabel
            Top = 8
            Alignment = taRightJustify
          end
          inherited Label5: TLabel
            Top = 33
            Alignment = taRightJustify
          end
          inherited Label4: TLabel
            Top = 129
            Alignment = taRightJustify
          end
          inherited Label3: TLabel
            Top = 105
            Alignment = taRightJustify
          end
          inherited Label2: TLabel
            Top = 81
            Alignment = taRightJustify
          end
          inherited Label1: TLabel
            Top = 57
            Alignment = taRightJustify
          end
          inherited TownBox: TDBLookupComboboxEh
            Top = 54
          end
          inherited StreetBox: TDBLookupComboboxEh
            Top = 78
          end
          inherited NLSEdit: TDBEditEh
            Top = 6
          end
          inherited NameEdit: TDBEditEh
            Top = 30
          end
          inherited HouseBox: TDBLookupComboboxEh
            Top = 102
          end
          inherited FindBtn: TButton
            Left = 60
            Top = 197
            Action = aRefresh
            Caption = #1055#1086#1080#1089#1082
            TabOrder = 8
          end
          inherited dbt2: TDBDateTimeEditEh
            TabOrder = 10
          end
          inherited dbt1: TDBDateTimeEditEh
            TabOrder = 11
          end
          inherited dbn2: TDBNumberEditEh
            Top = 293
            TabOrder = 12
          end
          inherited dbn1: TDBNumberEditEh
            Top = 273
            TabOrder = 13
          end
          inherited dbe2: TDBEditEh
            TabOrder = 14
          end
          inherited dbe1: TDBEditEh
            TabOrder = 15
          end
          inherited ClearBtn: TButton
            Left = 144
            Top = 197
            TabOrder = 9
          end
          inherited AppartBox: TDBLookupComboboxEh
            Top = 126
          end
          inherited AddBtn: TButton
            Left = 86
            Top = 241
            Width = 0
            Caption = #1057#1086#1093#1088#1072#1085#1080#1090#1100
            TabOrder = 16
            Visible = False
          end
          inherited lcb1: TDBLookupComboboxEh
            Top = 150
            TabStop = True
            DropDownBox.SpecRow.CellsText = ' ----'
            DropDownBox.SpecRow.Visible = True
            KeyField = 'ID'
            ListField = 'NAME'
            ListFieldIndex = 0
            ListSource = dscGroups
            TabOrder = 6
            Visible = True
            OnCloseUp = nil
            OnEnter = nil
            OnKeyPress = nil
          end
          inherited lcb2: TDBLookupComboboxEh
            TabOrder = 17
            OnCloseUp = nil
            OnEnter = nil
            OnKeyPress = nil
          end
          inherited lcb3: TDBLookupComboboxEh
            TabOrder = 18
            OnCloseUp = nil
            OnEnter = nil
            OnKeyPress = nil
          end
          inherited cb1: TDBCheckBoxEh
            Left = 104
            Top = 174
            Width = 105
            AllowGrayed = False
            Caption = #1047#1072#1082#1088#1099#1090#1099#1077' '#1051#1057
            TabOrder = 7
            TabStop = True
            Visible = True
          end
        end
      end
      inherited QStreets: TpFIBDataSet
        Transaction = MAINDM.pMainTransaction
        UpdateTransaction = MAINDM.pMainTransaction
      end
      inherited QHouses: TpFIBDataSet
        Transaction = MAINDM.pMainTransaction
        UpdateTransaction = MAINDM.pMainTransaction
      end
      inherited QTowns: TpFIBDataSet
        Transaction = MAINDM.pMainTransaction
        UpdateTransaction = MAINDM.pMainTransaction
      end
      inherited QApparts: TpFIBDataSet
        SelectSQL.Strings = (
          
            'select cast(0 as integer) as id, cast('#39' ---- '#39' as varchar(15)) a' +
            's num, '
          
            '       cast(-1 as integer) as apparts, cast(null as varchar(3)) ' +
            'as letter, '
          '       0 as acnt'
          '  from rdb$database'
          'union'
          'select max(v.id), v.num, v.apparts, v.letter, count(1) as acnt'
          '  from vw_abonents v'
          '  where v.building_id = :pbuilding_id'
          
            '--    and not exists(select first(1) 1 from abonents a1 where a1' +
            '.super_abonent = v.id)'
          '    and v.client_id >= 0'
          '--    and v.is_active = 1'
          '  group by 2,3,4'
          '  order by 3,4')
        Transaction = trList
        UpdateTransaction = trList
      end
    end
    inherited GroupBox1: TGroupBox
      Top = 250
      Height = 0
      Caption = ' '#1044#1086#1087#1086#1083#1085#1080#1090#1077#1083#1100#1085#1099#1081' '#1092#1080#1083#1100#1090#1088' '
      Visible = False
    end
    inherited TfraSubstanceInfo1: TfraSubstanceInfo
      Top = 250
      Height = 300
      inherited TopPanel: TPanel
        Height = 0
      end
      inherited BottomPanel: TPanel
        Top = 300
        Height = 0
      end
      inherited PageControl: TPageControl
        Top = 0
        Height = 300
        inherited TSInfo: TTabSheet
          Caption = ' '#1054#1073' '#1072#1073#1086#1085#1077#1085#1090#1077' '
          inherited InfoGrid: TDBGridEh
            Height = 269
          end
        end
      end
      inherited QSubstanceInfo: TpFIBDataSet
        SelectSQL.Strings = (
          'SELECT'
          '    RFIELD_NAME as NAME,'
          '    RFIELD_VALUE as VAL'
          'FROM'
          '    PROC_ABONENT_GET_PROP_LIST(:PABONENT_ID) ')
        DataSource = dscRefer
      end
    end
  end
  inherited Panel2: TPanel
    Width = 931
    Height = 550
    inherited Splitter2: TSplitter
      Top = 396
      Width = 931
    end
    inherited GroupBox2: TGroupBox
      Top = 401
      Width = 931
      Caption = ' '#1055#1086#1089#1083#1077#1076#1085#1080#1077' '#1087#1086#1082#1072#1079#1072#1085#1080#1103' '#1087#1088#1080#1073#1086#1088#1072' '
      inherited DetailGrid: TDBGridEh
        Width = 927
        DataSource = dscDetail
        UseMultiTitle = True
        VTitleMargin = 5
        Columns = <
          item
            EditButtons = <>
            FieldName = 'RDOCYEAR'
            Footers = <>
            Width = 72
          end
          item
            EditButtons = <>
            FieldName = 'RDOCMONTH'
            Footers = <>
          end
          item
            EditButtons = <>
            FieldName = 'RMAXIND'
            Footers = <>
            Width = 80
          end>
      end
    end
    inherited Panel3: TPanel
      Width = 931
      Height = 396
      inherited dbgRefer: TDBGridEh
        Width = 931
        Height = 396
        AllowedOperations = [alopUpdateEh]
        FrozenCols = 5
        IndicatorTitle.TitleButton = True
        Options = [dgEditing, dgTitles, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]
        OptionsEh = [dghFixed3D, dghHighlightFocus, dghClearSelection, dghAutoSortMarking, dghMultiSortMarking, dghRowHighlight, dghDblClickOptimizeColWidth, dghDialogFind, dghColumnResize, dghColumnMove]
        PopupMenu = PopupMenu1
        OnColEnter = dbgReferColEnter
        OnColExit = dbgReferColExit
        OnDblClick = aInsertExecute
        OnEnter = dbgReferColEnter
        OnGetCellParams = dbgReferGetCellParams
        OnKeyUp = dbgReferKeyUp
        Columns = <
          item
            Color = clInactiveCaptionText
            EditButtons = <>
            FieldName = 'RID'
            Footers = <>
            Visible = False
          end
          item
            Color = clInactiveCaptionText
            EditButtons = <>
            FieldName = 'RSERVICE'
            Footers = <>
          end
          item
            Color = clInactiveCaptionText
            EditButtons = <>
            FieldName = 'RABON_ID'
            Footers = <>
            Visible = False
          end
          item
            Color = clInactiveCaptionText
            EditButtons = <>
            FieldName = 'RADDRESS'
            Footers = <>
            Visible = False
          end
          item
            Color = clInactiveCaptionText
            EditButtons = <>
            FieldName = 'RTOWN'
            Footers = <>
          end
          item
            Color = clInactiveCaptionText
            EditButtons = <>
            FieldName = 'RSTREET'
            Footers = <>
          end
          item
            Color = clInactiveCaptionText
            EditButtons = <>
            FieldName = 'RHOUSE'
            Footers = <>
          end
          item
            Color = clInactiveCaptionText
            EditButtons = <>
            FieldName = 'FLAT'
            Footers = <>
            ReadOnly = True
            Width = 31
          end
          item
            Color = clInactiveCaptionText
            EditButtons = <>
            FieldName = 'RAPPART'
            Footers = <>
            Visible = False
          end
          item
            Color = clInactiveCaptionText
            EditButtons = <>
            FieldName = 'RLETTER'
            Footers = <>
            Visible = False
          end
          item
            Color = clInactiveCaptionText
            EditButtons = <>
            FieldName = 'RMETER_NUM'
            Footers = <>
          end
          item
            Color = clInactiveCaptionText
            EditButtons = <>
            FieldName = 'RMTYPE'
            Footers = <>
            Visible = False
          end
          item
            Color = clInactiveCaptionText
            EditButtons = <>
            FieldName = 'RNAME'
            Footers = <>
          end
          item
            Color = clInactiveCaptionText
            EditButtons = <>
            FieldName = 'RSTATUS'
            Footers = <>
            Visible = False
          end
          item
            Color = clInactiveCaptionText
            EditButtons = <>
            FieldName = 'RSTATUS_NAME'
            Footers = <>
            Visible = False
          end
          item
            Color = clInactiveCaptionText
            EditButtons = <>
            FieldName = 'RMETER_CAP'
            Footers = <>
            Visible = False
          end
          item
            Color = clInactiveCaptionText
            EditButtons = <>
            FieldName = 'RMETER_PREC'
            Footers = <>
            Visible = False
          end
          item
            Color = clInactiveCaptionText
            EditButtons = <>
            FieldName = 'RINDDATE'
            Footers = <>
          end
          item
            Color = clInactiveCaptionText
            EditButtons = <>
            FieldName = 'RIND'
            Footers = <>
            Width = 66
          end
          item
            EditButtons = <>
            FieldName = 'NEW_PH'
            Footers = <>
          end
          item
            Color = clInactiveCaptionText
            EditButtons = <>
            FieldName = 'NEW_POTR'
            Footers = <>
            Width = 79
          end
          item
            EditButtons = <>
            EditMask = '!99/99/00;1; '
            FieldName = 'NEW_PH_DATE'
            Footers = <>
            Width = 79
          end
          item
            EditButtons = <>
            FieldName = 'NEW_PZERO'
            Footers = <>
          end>
      end
    end
  end
  inherited shblActionList: TActionList
    Left = 96
    Top = 28
    inherited aInsert: TAction
      Caption = #1047#1072#1085#1077#1089#1090#1080' '#1087#1086#1082#1072#1079#1072#1085#1080#1103' '#1089#1095#1077#1090#1095#1080#1082#1072
      Hint = #1047#1072#1085#1077#1089#1090#1080' '#1087#1086#1082#1072#1079#1072#1085#1080#1103' '#1089#1095#1077#1090#1095#1080#1082#1072
    end
    inherited aEdit: TAction
      Visible = False
    end
    inherited aDelete: TAction
      Visible = False
    end
    inherited aRollback: TAction
      Visible = False
    end
    object aShowMeter: TAction
      Caption = #1055#1088#1086#1089#1084#1086#1090#1088' '#1089#1095#1077#1090#1095#1080#1082#1072
      Hint = #1055#1088#1086#1089#1084#1086#1090#1088' '#1089#1095#1077#1090#1095#1080#1082#1072
      ImageIndex = 21
      OnExecute = aShowMeterExecute
    end
    object aSetActDateToAll: TAction
      Caption = #1042#1099#1089#1090#1072#1074#1080#1090#1100' '#1076#1072#1090#1091' '#1087#1086#1082#1072#1079#1072#1085#1080#1081' '#1087#1086' '#1074#1089#1077#1084
      Hint = #1042#1099#1089#1090#1072#1074#1080#1090#1100' '#1076#1072#1090#1091' '#1089#1085#1103#1090#1080#1103' '#1087#1086#1082#1072#1079#1072#1085#1080#1081' '#1087#1086' '#1074#1089#1077#1084#1091' '#1089#1087#1080#1089#1082#1091
      OnExecute = aSetActDateToAllExecute
    end
  end
  inherited dsRefer: TpFIBDataSet
    RefreshSQL.Strings = (
      'SELECT'
      '    *'
      'FROM'
      '    PROC_V_METERS(:PNSL,'
      '    :PTOWN_ID,'
      '    :PSTREET_ID,'
      '    :PBUILDING_ID,'
      '    :PAPPARTS,'
      '    :PLETTER,'
      '    :PNAME,'
      '    :PGROUP_ID,'
      '    :PACTIVE,'
      '    :PADD_PARAMS) '
      'where RID = :RID')
    SelectSQL.Strings = (
      'SELECT'
      '    PROC_V_METERS.*,'
      '    PROC_V_METERS.rappart||coalesce(rletter, '#39#39') as flat,'
      '    cast(null as numeric(15,3)) as new_ph,'
      '    cast(null as d_sint) as new_pzero,'
      '    cast(null as numeric(15,3)) as new_potr,'
      '    cast(null as d_date) as new_ph_date  '
      'FROM'
      '    PROC_V_METERS(:PNSL,'
      '    :PTOWN_ID,'
      '    :PSTREET_ID,'
      '    :PBUILDING_ID,'
      '    :PAPPARTS,'
      '    :PLETTER,'
      '    :PNAME,'
      '    :PGROUP_ID,'
      '    :PACTIVE,'
      '    :PADD_PARAMS) '
      'order by rtown, rstreet, rhouse, rappart')
    AutoUpdateOptions.KeyFields = 'RID'
    AfterCancel = nil
    AfterEdit = nil
    AfterInsert = nil
    AfterOpen = nil
    AfterScroll = nil
    AfterRefresh = nil
    Database = MAINDM.pMainDatabase
    AfterFetchRecord = nil
    object dsReferRID: TFIBIntegerField
      DisplayLabel = #1048#1044
      FieldName = 'RID'
    end
    object dsReferRABON_ID: TFIBIntegerField
      FieldName = 'RABON_ID'
    end
    object dsReferRADDRESS: TFIBStringField
      DisplayLabel = #1040#1076#1088#1077#1089
      FieldName = 'RADDRESS'
      Size = 120
      EmptyStrToNull = True
    end
    object dsReferRMETER_NUM: TFIBStringField
      DisplayLabel = #1055#1088#1080#1073#1086#1088'|'#1053#1086#1084#1077#1088
      FieldName = 'RMETER_NUM'
      EmptyStrToNull = True
    end
    object dsReferRMTYPE: TFIBStringField
      DisplayLabel = #1055#1088#1080#1073#1086#1088'|'#1058#1080#1087
      FieldName = 'RMTYPE'
      Size = 16
      EmptyStrToNull = True
    end
    object dsReferRNAME: TFIBStringField
      DisplayLabel = #1055#1088#1080#1073#1086#1088'|'#1053#1072#1079#1074#1072#1085#1080#1077
      FieldName = 'RNAME'
      Size = 60
      EmptyStrToNull = True
    end
    object dsReferRIND: TFIBBCDField
      DisplayLabel = #1055#1086#1089#1083#1077#1076#1085#1080#1077' '#1087#1086#1082#1072#1079#1072#1085#1080#1103'|'#1047#1085#1072#1095#1077#1085#1080#1077
      FieldName = 'RIND'
      DisplayFormat = '#,##0.000'
      EditFormat = '0.000'
      Size = 3
      RoundByScale = True
    end
    object dsReferRINDDATE: TFIBDateField
      DisplayLabel = #1055#1086#1089#1083#1077#1076#1085#1080#1077' '#1087#1086#1082#1072#1079#1072#1085#1080#1103'|'#1044#1072#1090#1072
      FieldName = 'RINDDATE'
      DisplayFormat = 'dd.mm.yyyy'
    end
    object dsReferRSERVICE: TFIBStringField
      DisplayLabel = #1059#1089#1083#1091#1075#1072
      FieldName = 'RSERVICE'
      Size = 120
      EmptyStrToNull = True
    end
    object dsReferRSTATUS: TFIBIntegerField
      FieldName = 'RSTATUS'
    end
    object dsReferRSTATUS_NAME: TFIBStringField
      DisplayLabel = #1055#1088#1080#1073#1086#1088'|'#1057#1090#1072#1090#1091#1089
      FieldName = 'RSTATUS_NAME'
      EmptyStrToNull = True
    end
    object dsReferRTOWN: TFIBStringField
      DisplayLabel = #1040#1076#1088#1077#1089'|'#1043#1086#1088#1086#1076
      DisplayWidth = 20
      FieldName = 'RTOWN'
      Size = 120
      EmptyStrToNull = True
    end
    object dsReferRSTREET: TFIBStringField
      DisplayLabel = #1040#1076#1088#1077#1089'|'#1059#1083#1080#1094#1072
      DisplayWidth = 25
      FieldName = 'RSTREET'
      Size = 120
      EmptyStrToNull = True
    end
    object dsReferRHOUSE: TFIBStringField
      DisplayLabel = #1040#1076#1088#1077#1089'|'#1044#1086#1084
      DisplayWidth = 10
      FieldName = 'RHOUSE'
      Size = 30
      EmptyStrToNull = True
    end
    object dsReferRAPPART: TFIBIntegerField
      DisplayLabel = #1040#1076#1088#1077#1089'|'#1050#1074#1072#1088#1090#1080#1088#1072
      FieldName = 'RAPPART'
    end
    object dsReferRLETTER: TFIBStringField
      DisplayLabel = #1040#1076#1088#1077#1089'|'#1051#1080#1090'.'
      DisplayWidth = 5
      FieldName = 'RLETTER'
      Size = 3
      EmptyStrToNull = True
    end
    object dsReferRMETER_CAP: TFIBIntegerField
      FieldName = 'RMETER_CAP'
    end
    object dsReferRMETER_PREC: TFIBIntegerField
      FieldName = 'RMETER_PREC'
    end
    object dsReferRACCPOINT_ID: TFIBIntegerField
      FieldName = 'RACCPOINT_ID'
    end
    object dsReferNEW_PH: TFIBBCDField
      FieldName = 'NEW_PH'
      DisplayFormat = '#,##0.000'
      EditFormat = '0.000'
      Size = 3
      RoundByScale = True
    end
    object dsReferNEW_PZERO: TFIBSmallIntField
      FieldName = 'NEW_PZERO'
    end
    object dsReferNEW_POTR: TFIBBCDField
      FieldName = 'NEW_POTR'
      DisplayFormat = '#,##0.000'
      EditFormat = '0.000'
      Size = 3
      RoundByScale = True
    end
    object dsReferNEW_PH_DATE: TFIBDateField
      FieldName = 'NEW_PH_DATE'
      DisplayFormat = 'dd.mm.yyyy'
    end
    object dsReferFLAT: TFIBStringField
      FieldName = 'FLAT'
      Size = 14
      EmptyStrToNull = True
    end
  end
  inherited dscRefer: TDataSource
    DataSet = mteRefer
    Left = 88
  end
  inherited Timer1: TTimer
    OnTimer = Timer1Timer
  end
  inherited PropStorage: TPropStorageEh
    StoredProps.Strings = (
      '<P>.Height'
      '<P>.Left'
      '<P>.PixelsPerInch'
      '<P>.Top'
      '<P>.Width'
      '<P>.WindowState'
      'Panel2.GroupBox2.<P>.Height'
      'Panel2.Panel3.dbgRefer.<P>.Columns.<ForAllItems>.Width')
    Left = 64
    Top = 28
  end
  object dsDetail: TpFIBDataSet
    SelectSQL.Strings = (
      'SELECT'
      '    RDOCYEAR,'
      '    RDOCMONTH,'
      '    RSUMMA,'
      '    RMAXIND'
      'FROM'
      '    PROC_CASHIER_PAYSIND(null,'
      '    :PMETER_ID) ')
    Transaction = MAINDM.pMainTransaction
    Database = MAINDM.pMainDatabase
    Left = 76
    Top = 508
    object dsDetailRDOCYEAR: TFIBIntegerField
      DisplayLabel = #1043#1086#1076
      FieldName = 'RDOCYEAR'
    end
    object dsDetailRDOCMONTH: TFIBIntegerField
      DisplayLabel = #1052#1077#1089#1103#1094
      FieldName = 'RDOCMONTH'
    end
    object dsDetailRMAXIND: TFIBBCDField
      DisplayLabel = #1055#1086#1082#1072#1079#1072#1085#1080#1103
      FieldName = 'RMAXIND'
      Size = 3
      RoundByScale = True
    end
  end
  object dscDetail: TDataSource
    DataSet = dsDetail
    Left = 108
    Top = 508
  end
  object dsGroups: TpFIBDataSet
    SelectSQL.Strings = (
      'select s.id, s.name'
      'from services s'
      '  join vw_straits ss on ss.service_id = s.id'
      '  and ss.code = '#39'CAN_METER'#39
      'where s.group_id = 0')
    Transaction = MAINDM.pMainTransaction
    Database = MAINDM.pMainDatabase
    Left = 560
    Top = 231
  end
  object dscGroups: TDataSource
    DataSet = dsGroups
    Left = 596
    Top = 231
  end
  object PopupMenu1: TPopupMenu
    Images = MAIN.ImageList
    Left = 348
    Top = 219
    object N1: TMenuItem
      Action = aShowMeter
    end
    object N2: TMenuItem
      Action = aInsert
    end
    object N3: TMenuItem
      Action = aSetActDateToAll
    end
  end
  object mteRefer: TMemTableEh
    FieldDefs = <
      item
        Name = 'RID'
        DataType = ftInteger
      end
      item
        Name = 'RABON_ID'
        DataType = ftInteger
      end
      item
        Name = 'RADDRESS'
        DataType = ftString
        Size = 120
      end
      item
        Name = 'RMETER_NUM'
        DataType = ftString
        Size = 20
      end
      item
        Name = 'RMTYPE'
        DataType = ftString
        Size = 16
      end
      item
        Name = 'RNAME'
        DataType = ftString
        Size = 60
      end
      item
        Name = 'RIND'
        DataType = ftBCD
        Size = 4
      end
      item
        Name = 'RINDDATE'
        DataType = ftDate
      end
      item
        Name = 'RSERVICE'
        DataType = ftString
        Size = 120
      end
      item
        Name = 'RSTATUS'
        DataType = ftInteger
      end
      item
        Name = 'RSTATUS_NAME'
        DataType = ftString
        Size = 20
      end
      item
        Name = 'RTOWN'
        DataType = ftString
        Size = 120
      end
      item
        Name = 'RSTREET'
        DataType = ftString
        Size = 120
      end
      item
        Name = 'RHOUSE'
        DataType = ftString
        Size = 30
      end
      item
        Name = 'RAPPART'
        DataType = ftInteger
      end
      item
        Name = 'RLETTER'
        DataType = ftString
        Size = 3
      end
      item
        Name = 'RMETER_CAP'
        DataType = ftInteger
      end
      item
        Name = 'RMETER_PREC'
        DataType = ftInteger
      end
      item
        Name = 'RACCPOINT_ID'
        DataType = ftInteger
      end
      item
        Name = 'NEW_PH'
        DataType = ftBCD
        Size = 4
      end
      item
        Name = 'NEW_PZERO'
        DataType = ftSmallint
      end
      item
        Name = 'NEW_POTR'
        DataType = ftBCD
        Size = 4
      end
      item
        Name = 'NEW_PH_DATE'
        DataType = ftDate
      end
      item
        Name = 'FLAT'
        DataType = ftString
        Size = 14
      end>
    IndexDefs = <>
    Params = <>
    StoreDefs = True
    AfterOpen = dsReferAfterScroll
    BeforePost = mteReferBeforePost
    AfterScroll = dsReferAfterScroll
    OnCalcFields = mteReferCalcFields
    Left = 56
    Top = 320
    object mteReferRID: TIntegerField
      FieldName = 'RID'
      ReadOnly = True
      Visible = False
    end
    object mteReferRABON_ID: TIntegerField
      FieldName = 'RABON_ID'
      ReadOnly = True
      Visible = False
    end
    object mteReferRADDRESS: TStringField
      FieldName = 'RADDRESS'
      ReadOnly = True
      Visible = False
      Size = 120
    end
    object mteReferRTOWN: TStringField
      DisplayLabel = #1040#1076#1088#1077#1089'|'#1043#1086#1088#1086#1076
      DisplayWidth = 10
      FieldName = 'RTOWN'
      ReadOnly = True
      Size = 120
    end
    object mteReferRSTREET: TStringField
      DisplayLabel = #1040#1076#1088#1077#1089'|'#1059#1083#1080#1094#1072
      DisplayWidth = 15
      FieldName = 'RSTREET'
      ReadOnly = True
      Size = 120
    end
    object mteReferRHOUSE: TStringField
      DisplayLabel = #1040#1076#1088#1077#1089'|'#1044#1086#1084
      DisplayWidth = 6
      FieldName = 'RHOUSE'
      ReadOnly = True
      Size = 30
    end
    object mteReferRAPPART: TIntegerField
      DisplayLabel = #1040#1076#1088#1077#1089'|'#1050#1074'.'
      DisplayWidth = 6
      FieldName = 'RAPPART'
      ReadOnly = True
    end
    object mteReferRLETTER: TStringField
      DisplayLabel = #1040#1076#1088#1077#1089'|'#1083#1080#1090
      FieldName = 'RLETTER'
      ReadOnly = True
      Size = 3
    end
    object mteReferRMETER_NUM: TStringField
      DisplayLabel = #1055#1088#1080#1073#1086#1088' '#1091#1095#1077#1090#1072'|'#1053#1086#1084#1077#1088
      DisplayWidth = 10
      FieldName = 'RMETER_NUM'
      ReadOnly = True
    end
    object mteReferRMTYPE: TStringField
      DisplayLabel = #1055#1088#1080#1073#1086#1088' '#1091#1095#1077#1090#1072'|'#1058#1080#1087
      DisplayWidth = 10
      FieldName = 'RMTYPE'
      ReadOnly = True
      Size = 16
    end
    object mteReferRNAME: TStringField
      DisplayLabel = #1055#1088#1080#1073#1086#1088' '#1091#1095#1077#1090#1072'|'#1053#1072#1079#1074#1072#1085#1080#1077
      DisplayWidth = 10
      FieldName = 'RNAME'
      ReadOnly = True
      Size = 60
    end
    object mteReferRSERVICE: TStringField
      DisplayLabel = #1059#1089#1083#1091#1075#1072
      DisplayWidth = 15
      FieldName = 'RSERVICE'
      ReadOnly = True
      Size = 120
    end
    object mteReferRSTATUS: TIntegerField
      FieldName = 'RSTATUS'
      ReadOnly = True
      Visible = False
    end
    object mteReferRSTATUS_NAME: TStringField
      FieldName = 'RSTATUS_NAME'
      ReadOnly = True
      Visible = False
    end
    object mteReferRMETER_CAP: TIntegerField
      FieldName = 'RMETER_CAP'
      ReadOnly = True
      Visible = False
    end
    object mteReferRMETER_PREC: TIntegerField
      FieldName = 'RMETER_PREC'
      ReadOnly = True
      Visible = False
    end
    object mteReferRINDDATE: TDateField
      DisplayLabel = #1055#1088#1077#1076#1099#1076#1091#1097#1080#1077' '#1087#1086#1082#1072#1079#1072#1085#1080#1103'|'#1044#1072#1090#1072
      FieldName = 'RINDDATE'
      ReadOnly = True
    end
    object mteReferRIND: TBCDField
      DisplayLabel = #1055#1088#1077#1076#1099#1076#1091#1097#1080#1077' '#1087#1086#1082#1072#1079#1072#1085#1080#1103'|'#1055#1086#1082#1072#1079#1072#1085#1080#1103
      FieldName = 'RIND'
      ReadOnly = True
      Size = 0
    end
    object mteReferNEW_PH: TBCDField
      DisplayLabel = #1053#1086#1074#1099#1077' '#1087#1086#1082#1072#1079#1072#1085#1080#1103'|'#1055#1086#1082#1072#1079#1072#1085#1080#1103
      FieldName = 'NEW_PH'
      Size = 0
    end
    object mteReferNEW_PZERO: TSmallintField
      DisplayLabel = #1053#1086#1074#1099#1077' '#1087#1086#1082#1072#1079#1072#1085#1080#1103'|'#1055#1077#1088#1077#1093#1086#1076' '#1095#1077#1088#1077#1079' 0'
      FieldName = 'NEW_PZERO'
    end
    object mteReferNEW_PH_DATE: TDateField
      DisplayLabel = #1053#1086#1074#1099#1077' '#1087#1086#1082#1072#1079#1072#1085#1080#1103'|'#1044#1072#1090#1072' '#1089#1085#1103#1090#1080#1103
      FieldName = 'NEW_PH_DATE'
    end
    object mteReferNEW_POTR: TBCDField
      DisplayLabel = #1053#1086#1074#1099#1077' '#1087#1086#1082#1072#1079#1072#1085#1080#1103'|'#1055#1086#1090#1088#1077#1073#1083#1077#1085#1080#1077
      FieldName = 'NEW_POTR'
      Size = 0
    end
    object mteReferRACCPOINT_ID: TIntegerField
      FieldName = 'RACCPOINT_ID'
    end
    object mteReferFLAT: TStringField
      DisplayLabel = #1040#1076#1088#1077#1089'|'#1050#1074'.'
      FieldName = 'FLAT'
      Size = 14
    end
  end
  object qNewAct: TpFIBQuery
    Transaction = trCalc
    Database = MAINDM.pMainDatabase
    SQL.Strings = (
      'SELECT'
      '    RACT_ID'
      'FROM'
      '    PROC_METER_NEW_ACT(:PACCPOINT_ID,'
      '    :PDOCDATE,'
      '    :PDOCDATE,'
      '    :PMETER_STR,'
      '    :PMETER_PH_STR,'
      '    :PMETER_ZERO_STR) ')
    Left = 204
    Top = 293
    qoStartTransaction = True
  end
  object qCharge: TpFIBQuery
    Transaction = trCalc
    Database = MAINDM.pMainDatabase
    SQL.Strings = (
      'SELECT count(1)'
      'FROM'
      '    PROC_GEN_CHARGE_METER(:PACT_ID,'
      '    :PDOCDATE, 1) ')
    Left = 236
    Top = 293
    qoStartTransaction = True
  end
  object trCalc: TpFIBTransaction
    DefaultDatabase = MAINDM.pMainDatabase
    TimeoutAction = TARollback
    Left = 172
    Top = 293
  end
end
